package cn.jdy.plugins.entity;

import cn.jdy.common.bo.BaseEntry;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * @author wuzhiliang
 * @title: 会员下载智库信息记录实体类
 */
@Entity
public class Download extends BaseEntry {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;//主键
	@Column(nullable = false, length = 50)
	private String userId;//会员ID
	@Column(scale = 1)
	private int count;//下载次数
	@Column(scale = 1)
	private int score;//积分

	@Column(nullable = false)
	private Long docId;
	@ManyToOne(optional = false)
	@JoinColumn(name = "docId", insertable = false, updatable = false)
	private Doc doc;

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getDocId() {
		return docId;
	}

	public void setDocId(Long docId) {
		this.docId = docId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Doc getDoc() {
		return doc;
	}

	public void setDoc(Doc doc) {
		this.doc = doc;
	}

}
